<{include file="tpl/header.html"}>

<div>
	<h3>首页图片</h3>
	<table class="table table-striped">
		<tr>
			<th>ID</th>
			<th>图片预览</th>
			<th>描述</th>
			<th>链接</th>
			<th>替换</th>
		</tr>
		<{foreach item=item key=key from=$all_pic}>
			<tr>
				<td>
					<{$item.id}>
				</td>
				<td>
					<div style="width:80px;height:60px;">
						<img style="width:80px;height:60px;" src="<{$item.src}>">
						</img>
					</div>
				</td>
				<td>
					<form class="form-inline" action="<{spUrl c=shouye a=index article_id=$item.id}>" method="post">
						<input type="text" name="description" class="form-control input-sm ytadmin-input-min" value="<{$item.description}>"></input>
						<input type="hidden" name="pic_id" value="<{$item.id}>"/>
						<input type="submit" name="pic_update" class="btn btn-sm" value="更新"/>
					</form>
				</td>
				<td>
					<form class="form-inline" action="<{spUrl c=shouye a=index article_id=$item.id}>" method="post">
						<input type="text" name="url" class="form-control input-sm ytadmin-input-min" value="<{$item.url}>"></input>
						<input type="hidden" name="pic_id" value="<{$item.id}>"/>
						<input type="hidden" name="pic_url_update" value="<{$item.id}>"/>
						<input type="submit" name="pic_update" class="btn btn-sm" value="更新"/>
					</form>
				</td>
				<td>
					<form class="form-inline" enctype="multipart/form-data" action="<{spUrl c=shouye a=index article_id=$item.id}>" method="post">
						<input type="file" name="pic_src"></input>
						<input type="hidden" name="pic_src_update" value="<{$item.id}>"/>
						<input type="hidden" name="pic_id" value="<{$item.id}>"/>
						<input type="submit" name="pic_update" class="btn btn-sm" value="上传"/>
					</form>
				</td>
			</tr>
		<{/foreach}>
	</table>

</div>

<div class="clear"></div>
<{include file="tpl/footer.html"}>